// 音乐播放器
import { Button } from 'antd'
import { useRef } from 'react'
import './music.css'
function Music() {
    const imgRef = useRef(null);
    const play = () => {
        imgRef.current.style.animationPlayState = 'running'
    }
    const pause = () => {
        imgRef.current.style.animationPlayState = 'paused'
    }
    return <>
        <Button color="green" variant="solid">
            上一曲
        </Button>
        <Button color="blue" variant="solid" onClick={play}>
            播放
        </Button>
        <Button color="red" variant="solid" onClick={pause}>
            暂停
        </Button>
        <Button color="green" variant="solid">
            下一曲
        </Button>
        <br />
        <img ref={imgRef} src="http://10.2.35.4/nezha2/nezha.jpg" alt="" className='img' />

    </>
}

export default Music;